package pub.tbc.delay.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.joda.time.LocalDateTime;

import java.util.concurrent.TimeUnit;

/**
 * 延时任务定义
 *
 * @author tbc on 2017/8/10 10:57:48.
 */
@Slf4j
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DelayTaskDefine {
    private String bean;
    private String method;
    private Object[] params;
    /**
     * 开始计时时间
     */
    private LocalDateTime startTime;
    /**
     * 延时时长
     */
    private long delay;
    /**
     * 时间单位，默认分钟
     */
    private TimeUnit timeUnit = TimeUnit.SECONDS;

}
